Skip to content

feat: added auto refresh token #388#389

Merged
petruki merged 1 commit into
master-2from
staging
May 22, 2026
Merged

feat: added auto refresh token #388#389
petruki merged 1 commit into
master-2from
staging

Conversation

@petruki
Copy link
Copy Markdown
Member

@petruki petruki commented May 22, 2026

This pull request introduces a new feature to the Switcher client: automatic refresh of the API authentication token before expiration. It also refactors internal scheduling logic to support this feature and updates configuration, documentation, and tests accordingly.

New Feature: Automatic Token Refresh

  • Adds support for automatically refreshing the API token before it expires, controlled by a new configuration property.

Configuration and Documentation Updates

  • Adds the switcher.autorefreshtoken property to the configuration system and documents it in README.md. [1] [2] [3] [4]
  • Updates the ContextBuilder and SwitcherConfig classes to support and propagate the new property. [1] [2] [3] [4] [5]

Scheduling and Executor Service Refactor

  • Refactors executor services to separate snapshot and token refresh workers, and introduces new methods to manage the lifecycle of these workers. [1] [2] [3] [4] [5] [6]

Core Logic for Token Auto-Refresh

  • Implements scheduling logic in ClientRemoteService to refresh the authentication token shortly before it expires, with error handling and logging. [1] [2] [3] [4]

Other Updates

  • Bumps the project version to 2.6.0-SNAPSHOT.
  • Minor test refactoring for improved clarity and reuse. [1] [2] [3] [4] [5]

@petruki petruki added this to the v2.6.0 milestone May 22, 2026
@petruki petruki self-assigned this May 22, 2026
@petruki petruki added the enhancement New feature or request label May 22, 2026
@sonarqubecloud
Copy link
Copy Markdown

@petruki petruki merged commit 11874c0 into master-2 May 22, 2026
9 checks passed
@petruki petruki deleted the staging branch May 22, 2026 01:11
petruki added a commit that referenced this pull request May 22, 2026
petruki added a commit that referenced this pull request May 22, 2026
* feat: added auto refresh token #388 (#389)

* bump v1 to 1.10.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant